import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import ElementUI from 'element-ui'//全局element-ui
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'//全局axios
import VueAxios from 'vue-axios'
import qs from 'qs';
import globalVariable from '@/global_variable.js'

Vue.use(VueAxios, axios)
Vue.use(ElementUI)
Vue.prototype.$qs = qs;
Vue.prototype.GLOBAL=globalVariable
Vue.config.productionTip = false

// axios.interceptors.request.use(config => {
//   config.headers.Authorization ='Bearer '+window.sessionStorage.getItem('token');
//   return config;
// })
//创建VUE页面
new Vue({
  router,  //路由参数
  store,   //VueX对象
  render: h => h(App)    //render函数 :箭头函数（渲染APP文件）
}).$mount('#app')
